/**
 * Created by Dalyn on 2017/4/06.
 */
import Relay from "react-relay";

export default class getNewVersionOrderMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getNewVersionOrder }`;
    }

    getVariables() {
        return {
            argsInput: {
              enId: this.props.enId,
              orderId: this.props.orderId,
              status: this.props.status
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getNewVersionOrderPayload {
            getNewVersionOrder {
                errorCode
                value
                totalResult
                id
                order{
                    enquiryId
                    status
                    activeKey
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on getNewVersionOrderPayload {
                    getNewVersionOrder {
                        errorCode
                        value
                        totalResult
                        id
                        order{
                            enquiryId
                            status
                            activeKey
                        }
                    }
                }
            `]
        }];
    }

}
